<template>
  <div>
    <div ref="box"><button>hehe</button></div>
  </div>
</template>

<script>
import { ref,onMounted } from "vue";
export default {
  name: "ref",
  setup(){
    const box = ref(4)
    onMounted(()=>{
      console.log(box.value)
    })
  }
};
</script>